# -*- coding: utf-8 -*-
import os
from configparser import ConfigParser

class ReadMySQLConfig:

    def __init__(self):
        file_path = os.path.join('../file/config/config.ini')
        self.config = ConfigParser()
        self.config.read(file_path)
        self.database = 'database'

    def getDBHost(self):
        return self.config.get(self.database, 'HOST')

    def getDBUser(self):
        return self.config.get(self.database, 'USER')

    def getDBPassword(self):
        return self.config.get(self.database, 'PASSWORD')

    def getDBPort(self):
        return self.config.get(self.database, 'PORT')

    def getDBDatabase(self):
        return self.config.get(self.database, 'DATABASE')

    def getDBCharset(self):
        return self.config.get(self.database, 'CHARSET')

